import {Vec3} from "cc";
import {FishGameAction} from "db://assets/script/game/constants/fish-game-action";
import {FishGameStatus} from "db://assets/script/game/constants/fish-game-status";

export class FishDoSomethingEvent {
    public gameAction: FishGameAction
    public fishStatusLoader: () => FishGameStatus
    public backgroundAnimationName: string
    public backgroundAnimationRepeatCount: number
    public animationCallback: () => void
    public moveTo: () => Vec3
    public moveCallback: () => void
    public moveDuration: number
    public animationDuration: number

    // constructor(gameAction: FishGameAction, action: () => Promise<void>[]) {
    //     this.gameAction = gameAction;
    //     this.action = action;
    // }

    constructor(gameAction: FishGameAction, fishStatusLoader: () => FishGameStatus, backgroundAnimationName: string, backgroundAnimationRepeatCount: number, animationCallback: () => void, moveTo: () => Vec3, moveDuration: number, moveCallback: () => void, animationDuration: number) {
        this.gameAction = gameAction;
        this.fishStatusLoader = fishStatusLoader;
        this.backgroundAnimationName = backgroundAnimationName;
        this.backgroundAnimationRepeatCount = backgroundAnimationRepeatCount;
        this.animationCallback = animationCallback;
        this.moveTo = moveTo;
        this.moveDuration = moveDuration;
        this.moveCallback = moveCallback;
        this.animationDuration = animationDuration;
    }
}